<?php
if ( isset($_SERVER['SERVER_NAME']) )
{
    define('BASE_URL', 'http://'.$_SERVER['SERVER_NAME']);
    define('DOCUMENT_DOMAIN', $_SERVER['SERVER_NAME']);
    define('BASE_URL_CLUB', BASE_URL.'/clbtoiyeu');
}//end if

$zone = (isset($_SERVER['ZONE_ENV']))?$_SERVER['ZONE_ENV']:'hcm';
define('ZONE_ENV', $zone);
define('CACHING_PREFIX_CLUB', 'clubfavor:');
define('CACHING_PREFIX', 'vnett:');
define('GEARMAN_SEPERATOR', ':vnett:');
define('CACHING_PAGE', (isset($_GET['pc']))?1:0);
define('COOKIE_DOMAIN', 'vnexpressdev.net');
define('APP_CONFIG', 'vne-configuration');
define('GLOBAL_SESSION_CONFIG', 'session');
define('GLOBAL_CACHING_CONFIG', 'bb-global-caching');

//Check registered
if ( Zend_Registry::isRegistered(APP_CONFIG) )
{
    //Start load from global config
    $app_config = Zend_Registry::get(APP_CONFIG);
}
else
{
    $app_config = new Zend_Config_Ini(APPLICATION_PATH.'/configs/application-'.APP_ENV.'.ini');
}//end if

// Define site URL
define('SITE_URL', $app_config->app->url);
define('PREFIX_URL', 'tin-tuc/');
//define cons
define('SESSION_NAMESPACE', $app_config->session_namespace);

define('CSS_URL', $app_config->app->css);
define('JS_URL', $app_config->app->js);
define('IMAGE_URL', $app_config->app->images);
define('FLASH_URL', $app_config->app->flash);
define('PHOTO_URL', $app_config->app->photo);
define('TRACKING_URL', $app_config->app->comment);
define('VIDEO_URL', $app_config->app->video);

/**
 * For CLB Toi Yeu
 */
define('CSS_URL_CLUB', CSS_URL.'/clbty');
define('JS_URL_CLUB', JS_URL.'/clbty');
define('IMAGE_URL_CLUB', IMAGE_URL.'/clbty');
define('FLASH_URL_CLUB', FLASH_URL.'/clbty');
define('UPLOAD_URL_CLUB', $app_config->app->club->upload);
define('BANBE_URL', $app_config->app->banbeurl);
define('UPLOAD_PATH_CLUB', DOCUMENT_ROOT.'/site');

// Name for gearman
define('SITE_ID', 1002565);
define('CATE_ID_EURO', 1002619);
define('CATE_ID_PHOTO', 1002586);
define('CATE_ID_VIDEO', 1002566);
define('CATE_ID_BONGDAQUOCTE', 1002567);
define('CATE_ID_NGOAIHANGANH', 1002580);
define('CATE_ID_CHAMPIONSLEAGUE', 1002575);
define('CATE_ID_LALIGA', 1002574);//1002582);
define('CATE_ID_SERIA', 1002581);//1002581);
define('CATE_ID_CACGIAIKHAC', 1002584);//1002584);

define('CATE_ID_BUNDESLIGA', 1002583);
define('CATE_ID_FIXTURE', 1002571); /*Cate Lich thi dau*/
define('CATE_ID_BEHINDS_SCENES', 1002570); /*Cate Hau truong*/
define('CATE_ID_PORTRAIT', 1002572); /*Cate Chan dung*/

//Define limit]
define('LIMIT_OTHER_NEWS',5);//Gioi han 5 tin box cac tin khac
define('LIMIT_HOT_NEWS', 5);//Gioi han 5 tin hot
define('LIMIT_PORTRAIT', 4);//Gioi han 4 tin o box chan dung
define('LIMIT_BEHINDS_SCENES', 3);//Gioi han 3 tin o box hau truong
define('LIMIT_FOOTBALL_VIDEO', 3);//Gioi han 3 video trong box bong da
define('LIMIT_NEW_ALBUM', 3);//Gioi han 3 album moi nhat
define('LIMIT_HOT_ALBUM', 3);//Gioi han 3 photo trong box slide photo do bien tap vien set hot hoac 3 photo moi nhat neu ben tap vien khong set
define('LIMIT_PHOTO',50);//Giới hạn 50 photo popup trong 1 album
define('LIMIT_RELATED_MEDIA',2);//Giới hạn 2 media liên quan
define('LIMIT_RELATED_PHOTO',2);//Giới hạn 2 ảnh liên quan
define('LIMIT_ALBUM', 6);//Gioi han so album tren 1 trang
define('LIMIT_NEW_MORE', 10);//Gioi han 1 xem them tin
define('LIMIT_TOPIC', 10);//Limit topic will be show if admin set config = null

define('HOME_CATEGORY_ID', SITE_ID);

// Top box
define('TOTAL_HOT_NEWS', 6);
define('TOTAL_TOP_VIEW', 6);
define('TOTAL_TOP_COMMENT', 6);
//Define article type
define('ARTICLE',1);//1: article
define('VIDEO',2);//2: video
define('ALBUM',3);//3: album

define('LIMIT_NEW_VIDEO', 16);//Gioi han 16 video trang home
define('LIMIT_NEW_PHOTO', 8);//Gioi han 8 photo trang home
define('LIMIT_HOT_NEWS_IFB', 13);//Gioi han 13 news cua International Football
define('LIMIT_HOT_NEWS_TEAM', 6);//Gioi han 13 news cua International Football

//define limit site video/sub video
define('LIMIT_HOT_VIDEO_SITE', 6);//Gioi han 6 video hot trang video
define('LIMIT_NEW_VIDEO_SITE', 15);//Gioi han 15  video new trang video

//define limit site photo/sub photo
define('LIMIT_NEW_PHOTO_SITE', 18);//Gioi han 18  photo new trang photo
define('LIMIT_SHOWMORE_PHOTO_SITE', 9);//Gioi han 9  photo showmorw trang photo
define('LIMIT_TOPVIEW_VIDEO', 3);//Gioi han 3 video xem nhieu nhat trang photo


define('PARENT_PARAMS_CONFIG', 'parentParams');
define('EXCLUSE_ARTICLES', 'excluseArticles');
?>